<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>layout 后台大布局 - Layui</title>
<link th:href="@{../layui/css/layui.css}" rel="stylesheet" />
</head>
<body>
	<div th:include="header :: right"></div> 	
	<div class="layui-body">
		 <ul style="padding: 53px 4px;" class="layui-tab-title">
	      <li class="layui-this">模型列表</li>
	      <li><a th:href="@{/model/form}">识别模型添加</a></li>
	    </ul>
	
    <!-- 内容主体区域 -->
    <div style="padding: 53px 4px;"  >
	  <!--  <form class="layui-form" action="">
		  <div class="layui-form-item">
		    <label class="layui-form-label">模型名：</label>
		    <div class="layui-input-block">
		      <input name="modelName" lay-verify="title"  autocomplete="off"  class="layui-input" type="text"/>
		    </div>
		    <label class="layui-form-label">模型类型：</label>
		    <div class="layui-input-block">
		      <input name="modelType" lay-verify="title"  autocomplete="off"  class="layui-input" type="text"/>
		    </div>
		  </div>
	  </form>  -->
	  
	   <form class="layui-form" action="/model/list">
		  <div class="layui-form-item">
		    <label class="layui-form-label">模型名：</label>
		    <div class="layui-input-inline">
		      <input name="fileName" lay-verify="title" th:value="${queryObj.fileName}"   autocomplete="off" placeholder="请输入文件名" class="layui-input" type="text"/>
		    </div>
		    <div class="layui-form-item">
		    <label class="layui-form-label">模型类型：</label>
		    <div class="layui-input-inline">
		    	<select name="taskType" lay-filter="aihao">
			        <option value=""></option>
			        <span th:if="${'0' eq queryObj.taskType}" > 
			        	<option value="0" selected="selected">场景</option>
			        	<option value="1" >视频</option>
			        </span>
			        <span th:unless="${'0' eq queryObj.taskType}" > 
			        	<option value="0" >场景</option>
			        	<option value="1" selected="selected">视频</option>
			        </span>
			     </select>
		    </div>
		   </div>
		  </div>
		  <input type="submit" class="layui-btn layui-btn-radius" value="查询"/>
	  </form> 
	  
    	<table  class="layui-table" lay-skin="line">
				<thead>
					<tr> 
						<th>模型ID</th>
						<th>模型名</th>
						<th>模型路径</th>
						<th>模型类别</th>
						<th>模型描述文件</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<th:block th:each="model : ${page.content}" >
						<tr>
							<td th:text="${model.modelId}"></td>
							<td th:text="${model.modelName}"></td>
							<td th:text="${model.modelPath}"></td>
							<!-- <td th:text="${model.modelType}"></td> -->
							<td th:text="((${model.modelType} == '0')? '场景' : '视频')"></td>
							<td th:text="${model.modelDescription}"></td>
							<td th:text="${model.createTime}"></td>
							<td>
								<a  th:href="${'/model/form?modelId='+model.modelId+'&amp;view=view'}" class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
								  <a th:href="${'/model/form?modelId='+model.modelId}" class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
								  <a th:href="${'/model/delete?modelId='+model.modelId}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
							</td>
						</tr>
					</th:block>
				</tbody>
			</table> 
			<!-- 分页 -->
			<div th:include="page :: pager" th:remove="tag"/>  
    </div>
  </div>
  
  <div class="layui-footer">
    © layui.com - 底部固定区域
  </div>
  <script th:src="@{../layui/layui.js}"></script>
<script>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;
});
layui.use('form', function(){
	  var form = layui.form;
	  
	  //各种基于事件的操作，下面会有进一步介绍
	});
</script>	
	 
</body>
</html>